<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of login
 *
 * @author gt
 */
class User extends Modal {
    //put your code here
public function login(){

	$this -> db -> select('id, login_name, password');
    $this -> db -> from('login');
    $this -> db -> where('login_name = ' . "'" . $username . "'");
    $this -> db -> where('password = ' . "'" . MD5($password) . "'");
    $this -> db -> limit(1);
    $query = $this -> db -> get();
   if($query -> num_rows() == 1)
   {
     return $query->result();

   }

   else
   {
     return false;
   }
	}
	
	}

?>
